package com.csc.controller;

import com.csc.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 86130
 * @version 1.0
 * @description: TODO
 * @date 2025/6/9 上午11:34
 */
@Controller
@ResponseBody
@RequestMapping("/user")
public class UserController {
    //value:    请求路径
    //produces:  指定返回值类型
    //method:    请求方式
    @RequestMapping(value = "hi")
    public String getList(){
        return "员工列表数据";
    }

    @RequestMapping(value = "/getUser")
    public User getUser(){
        User user = new User();
        user.setId(1);
        user.setName("张三");
        user.setPassword("<PASSWORD>");
        user.setAge("18");
        user.setSex("男");
        user.setEmail("<EMAIL>");
        user.setPhone("12345678901");
        user.setAddress("北京");
        return user;
    }
}
